use crate::api::prelude::*;
use async_trait::async_trait;
use axum::extract::State;
use demo_api::api::{prelude::Json, task::*};
use std::convert::Infallible;
use log::error;

#[derive(Handler)]
pub struct TaskApiImpl {
    pub db: State<String>,
}

#[impl_api]
#[async_trait]
impl TaskApi for TaskApiImpl {
    async fn get_by_id(self, _req: Json<Req>) -> Result<Res, Infallible> {
        Ok(Res {
            order_no: String::default(),
        })
    }

    async fn update_user(self, _req: Json<Req>) -> Result<Res, Error> {
        Ok(Res {
            order_no: String::default(),
        })
    }
}
